import axios from "axios";

const request = axios.create({
  baseURL: "/api",
  timeout: 2000,
});

request.interceptors.request.use(
  function (config) {
    return config;
  },
  function (err) {
    return Promise.reject(err);
  }
);

request.interceptors.response.use(
  function (response) {
    return response;
  },
  function (err) {
    return Promise.reject(err);
  }
);

export default request;
